Find the number of complex solutions to
\[\frac{z^3 - 1}{z^2 + z - 2} = 0.\]
Explanation: The numerator factors as $z^3 - 1 = (z - 1)(z^2 + z + 1) = 0.$

If $z = 1,$ then the denominator is undefined, so $z = 1$ is not a solution.  On the other hand, $z^2 + z + 1 = 0$ has $\boxed{2}$ complex roots, which satisfy the given equation.